﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using ENUMS;

public partial class manaPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //如果用户还未登陆，则跳转到登陆页面
        if(Session["landInfo"]==null)
            Response.Redirect("Landing.aspx");        
        //根据当前登陆都身份隐藏相应控件
        switch (((landInfo)Session["landInfo"]).Ident)
        {
            //辅导员
            case identity.counsellor: RegisterStartupScript("vali", "<script type='text/javascript' language='javascript'>fnShowFDYMenu()</script>");
                break;
            //管理员
            case identity.manager: RegisterStartupScript("vali", "<script type='text/javascript' language='javascript'>fnShowManaMenu()</script>");
                break;
            //学生
            case identity.student: RegisterStartupScript("vali", "<script type='text/javascript' language='javascript'>fnShowXSMenu()</script>");
                break;
            default: Response.Redirect("Landing.aspx"); break;
        }
        //使用脚本加载页面
        Page.RegisterStartupScript("home", "<script type='text/javascript' language='javascript'>fnLoadPage('home.aspx')</script>");
    }
}
